require("../../assets/css/index.less");
require("./mybadge.less");
require("../../assets/fonts_three/iconfont.css");
require("../../utils/dom");
const axios = require("axios");
require('../../utils/https');
axios.defaults.headers.common['Authorization'] = "Bearer " + JSON.parse(localStorage.getItem("token"));
const { $ } = require("../../utils/dom");

$(".icon-zuojiantou").addEventListener("click", function() {
    location.href = "/my.html";
});

async function fn() {
    const res = await axios.get("/api/exercise/badge")
    console.log(res.data.data[0].id);
    if (res.data.errno === 0) {
        $(".header_right h1").textContent = res.data.data[0].id;
    }
}
fn();